package presentation.beans;

import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

import metier.AffectationAction;

@Named
@SessionScoped
public class AffectationBean implements java.io.Serializable{

	private Long idAffectation;
	private PersonneBean personneBean;
	private ProjetBean projetBean;
	private RoleBean roleBean;
	
	public AffectationBean() {
	}

	public Long getIdAffectation() {
		return idAffectation;
	}

	public void setIdAffectation(Long idAffectation) {
		this.idAffectation = idAffectation;
	}
	
	public PersonneBean getPersonne() {
		return personneBean;
	}

	public void setPersonne(PersonneBean personne) {
		this.personneBean = personne;
	}

	public ProjetBean getProjet() {
		return projetBean;
	}

	public void setProjet(ProjetBean projet) {
		this.projetBean = projet;
	}

	public RoleBean getRole() {
		return roleBean;
	}

	public void setRole(RoleBean role) {
		this.roleBean = role;
	}
	
	public AffectationBean doCreateAffectation(AffectationBean affectationBean){
		AffectationAction affectationAction = new AffectationAction();
		affectationBean=affectationAction.createAffectation(affectationBean);
		return affectationBean;
	}
}
